package com.qiyuexinxi.chat.mapper;

import com.qiyuexinxi.chat.domain.ThumbInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ThumbInfoMapper {

    //将数据设置为删除状态
    int deletedThumbInfo(ThumbInfo record);

    List<ThumbInfo> selectByIdAndType(@Param("thumbAssociationId") Integer thumbAssociationId, @Param("thumbAssociationType") Integer thumbAssociationType);

    Integer selectCountByIdAndType(@Param("thumbAssociationId") Integer thumbAssociationId, @Param("thumbAssociationType") Integer thumbAssociationType);

    //获取请求是否对当前内容点赞
    Integer selectIsThumb(@Param("thumbAssociationId") Integer thumbAssociationId,@Param("thumbAssociationType") Integer thumbAssociationType,@Param("userId") Integer userId);

    int deleteByPrimaryKey(Integer thumbId);

    int insert(ThumbInfo record);

    int insertSelective(ThumbInfo record);

    ThumbInfo selectByPrimaryKey(Integer thumbId);

    int updateByPrimaryKeySelective(ThumbInfo record);

    int updateByPrimaryKey(ThumbInfo record);

}